package work;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class zy1 {
	public static void main(String[] args) throws Exception {
		ArrayList<Student> list = new ArrayList<>();
		BufferedReader br=new BufferedReader(new FileReader("name.txt"));
		String line;
		while((line=br.readLine())!=null){
			String[] split = line.split("-");
			Student s = new Student(split[0], split[1], Integer.parseInt(split[2]));
			list.add(s);
		}
		br.close();
		Random rd = new Random();
		int index = rd.nextInt(list.size());
		Student student = list.get(index);
		System.out.println(student.getName());
	}
}
